package com.hua.utils;

import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;

public class WeatherData {
	public static String CityDataXml() {
		try {
			// 閫氳繃鍙嶅皠鑾峰緱绫荤殑鍔犺浇鍣�鐒跺悗灏嗘枃浠跺姞杞�
			InputStream inputStrem = CityDatasource.class.getClassLoader()
					.getResourceAsStream("com/hua/utils/citys.xml");
			BufferedReader buffer = new BufferedReader(new InputStreamReader(
					inputStrem, "utf-8"));
			String values = "";
			StringBuilder sb = new StringBuilder();
			try {
				while ((values = buffer.readLine()) != null) {
					sb.append(values);
				}
				return sb.toString();
			} catch (Exception e) {
				e.printStackTrace();
			} finally {
				if (buffer != null) {
					try {
						buffer.close();
					} catch (Exception e2) {
						e2.printStackTrace();
					}
				}
			}
		} catch (Exception e) {
			e.printStackTrace();
		}

		return null;
	}
}
